<script>
	import {
		mapState,
		mapMutations
	} from 'vuex';
	export default {
		computed: {
			...mapState(['isLogin,userInfo,isWatch,account,t_id']),
		},
		methods: {
			...mapMutations(['login'])
		},
		onLaunch: function() {
			const userInfo = uni.getStorageSync('userInfo'); //同步获取本地数据
			//判断本地缓存是否存在数据
			if (userInfo !== "") {
				//传到vuex里面储存起来,并改变登录状态
				this.login(userInfo)
			}
			console.log('App Launch')
		},
		onShow: function() {
			console.log('App Show');
		},
		onHide: function() {
			console.log('App Hide')
		},
		globalData: {
			list: '',
			index: '',
			t_id: 0,
			d_account: 0,
			t_name: ''
		}

	}
</script>

<style lang="scss">
	@import "@/uni_modules/uni-scss/index.scss";
	/*每个页面公共css */
	@import url("static/icon/iconfont.css");

	page {
		display: flex;
		flex-direction: column;
		height: 100%;
	}
</style>
